unit ClientMain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, WideStrings, DbxDatasnap, StdCtrls, SqlExpr, DB, DBClient, DSConnect,
  FMTBcd, Provider, Grids, DBGrids;

type
  TForm2 = class(TForm)
    SQLConnection1: TSQLConnection;
    Button1: TButton;
    Label1: TLabel;
    SqlServerMethod1: TSqlServerMethod;
    DBGrid1: TDBGrid;
    DataSource1: TDataSource;
    DataSetProvider1: TDataSetProvider;
    ClientDataSet1: TClientDataSet;
    Button2: TButton;
    SqlServerMethod2: TSqlServerMethod;
    DataSetProvider2: TDataSetProvider;
    ClientDataSet2: TClientDataSet;
    DataSource2: TDataSource;
    DBGrid2: TDBGrid;
    Button3: TButton;
    Label2: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

uses ClientClass1;

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
var
  Demo: TDSServerModule2Client;
  ServerTime: TDateTime;
begin
  Demo := TDSServerModule2Client.Create(SQLConnection1.DBXConnection);
  try
    ServerTime := Demo.GetTime;
    Label1.Caption := DatetimeToStr(ServerTime);
  finally
    Demo.Free;
  end;
end;

procedure TForm2.Button2Click(Sender: TObject);
begin
  ClientDataSet1.Open;
end;

procedure TForm2.Button3Click(Sender: TObject);
begin
  ClientDataSet2.Open;
end;

end.
